<?php
    session_start();
    if(!isset($_SESSION['user'])){
        header("Location: index.php");    
    }else{
        include("conect_db.php");
        include("constants.php");
    }

?>
<html>
    <head>
        <link REL=StyleSheet HREF="styles/sa002.css" TYPE="text/css">
    </head>
    <body>
        <div id="wrapper">
            <div id="left_menu">
                <p align="center">
                    <a href="http://localhost/index.php"><img src="img/kx.jpg" id="imLogo" alt="kxCorp" border="0" width="96" height="100"/></a>
                </p>
                <p align="center">
                   <a href="index.php"><img src="img/b_home.png" id="imLogo" alt="kxCorp" border="0"/></a>
                   <a href="logout.php"><img src="img/s_loggoff.png" id="imLogo" alt="kxCorp" border="0"/></a>
                </p>

                <p align ="center">
                    <?php //Creating options in the module
                        if( isset( $_GET['mod'] ) ){
                            switch($_GET['mod']){
                                case 'users':
                                    echo "<ul TYPE=square>
                                            <li><a href='actions.php?mod=".$_GET['mod']."&action=browse'><img src='img/b_browse.png'/> Examinar</a>
                                            <li><a href='actions.php?mod=".$_GET['mod']."&action=insert'><img src='img/b_insert.png'/> Ingresar</a>
                                            <li><a href='actions.php?mod=".$_GET['mod']."&action=search'><img src='img/b_search.png'/> Buscar</a>
                                          </ul>";
                                    break;
                            }
                        }

                    ?>
                </p>
            </div><!--End of left_menu-->
            <div id="main_content">
                <?php
                   echo "<p><a href='index.php'><img src='img/b_home.png' id='imLogo' alt='kxCorp' border='0'/>".LICEO."</a></p>";
                ?>
                <div id="central_menu">
                    <a href='actions.php?mod=users'>Usuarios</a> | <a href='#'>Representantes</a> | <a href='#'>Alumnos</a> |
                    <a href='#'>Materias</a> | <a href='#'>Calificaciones</a> | <a href='#'>Horarios</a> |
                    <a href='#'>Inscripciones</a> | <a href='#'>Reportes</a> |
                </div><!-- End of central_menu-->
                
                <div id="module_content">
                    
                    <?php
                        if( isset( $_GET['mod'] ) ){
                            switch($_GET['mod']){
                                case 'users':
                                    //
                                    if( isset( $_GET['action'] ) ){
                                        switch($_GET['action']){
                                            case 'browse':
                                                include('modules/users-browse.php');
                                                break;
                                        }
                                    }
                                    //
                                    break;
                            }
                        }
                    ?>
                </div>

            </div><!--End of main_content-->
            <div id="footer">
                Developed By <a href="http://localhost/index.php">KxCorp</a> License GPL3
            </div>
        </div><!--End of wrapper-->
    </body>
</html>
